<?php
class Zend_View_Helper_listanswer
{
	public function listanswer($data)
	{
		if(!$data)
			return ;
		$strList = "";
		foreach ($data as $key=>$row)
		{
			$strList .= "<fieldset id='con_$key'><legend>Lựa chọn ".($key+1)." </select>&nbsp<a href='javascript:delAnswer(".$key.")' title='Delete' class='tool-16 delete'></a></legend>";
			$strList .= "<table>";
			$strList .= "	<tr>";
			$strList .= "		<td><label>Mã lựa chọn</label></td>";
			$strList .= "		<td colspan='3'><TEXTAREA Name='atitle[]' rows='3' cols='0' style='width: 250px;text-align: left;'>".$row->atitle."</TEXTAREA> </td>";
			$strList .= "		<td><label>Số lần chọn</label></td>";
			$strList .= "		<td><input readonly type='text' name ='acount[]' value = '".$row->acount."'></td>";
			$strList .= "	</tr>";
			$strList .= "</table>";
			$strList .="</fieldset>";
		}
		$strList .="";
		echo $strList;
	} 
} 
?>
